import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    levelList: ['县级', '乡镇级/街道', '村', '社区'],
    areaList: ['200', '500', '1000', '1500', '2000', '2500', '3000', '3500', '4000', '4500', '5000'],
    capacityList: [50, 60, 100, 200, 300, 1000],
    streeList: [],
    villageList: [],
    theme: 'dark'
  },
  mutations: {
    getStreeList (state, data) {
      state.streeList = [...data]
    },
    getVillageList (state, data) {
      state.villageList = [...data]
    },
    changetheme (state, payload) {
      state.theme = payload
    }
  },
  getters: {
    getstree (state) {
      return state.streeList
    },
    getVillage (state) {
      return state.villageList
    },
    getTheme (state) {
      return state.theme
    }
  },
  actions: {},
  modules: {}
})
